import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const USER: AppRouteRecordRaw = {
    path: '/analysis',
    name: 'analysis',
    component: DEFAULT_LAYOUT,
    meta: {
        locale: 'menu.analysis',
        icon: 'icon-storage',
        requiresAuth: true,
        order: 1,
    },
    children: [
        {
            path: 'business',
            name: 'business-management',
            component: () => import('@/views/analysis/business/index.vue'),
            meta: {
                locale: 'business.management',
                requiresAuth: true,
                roles: ['*'],
            },
        },
        {
            path: 'member',
            name: 'member-management',
            component: () => import('@/views/analysis/member/index.vue'),
            meta: {
                locale: 'member.management',
                requiresAuth: true,
                roles: ['*'],
            },
        },
        {
            path: 'fleet',
            name: 'fleet-management',
            component: () => import('@/views/analysis/fleet/index.vue'),
            meta: {
                locale: 'fleet.management',
                requiresAuth: true,
                roles: ['*'],
            },
        },
        {
            path: 'recharge',
            name: 'recharge-management',
            component: () => import('@/views/analysis/recharge/index.vue'),
            meta: {
                locale: 'recharge.management',
                requiresAuth: true,
                roles: ['*'],
            },
        },
        {
            path: 'fuel',
            name: 'fuel-management',
            component: () => import('@/views/analysis/fuel/index.vue'),
            meta: {
                locale: 'fuel.management',
                requiresAuth: true,
                roles: ['*'],
            },
        },
    ],
};

export default USER;
